{include file=$header_start}
{strip}
<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/dashboard.css">
<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/find_job_list.css">
<script type="text/javascript" src="{$siteroot}/greybox/greybox.js"></script>
<link href="{$siteroot}/greybox/greybox.css" rel="stylesheet" type="text/css" media="all" />
{/strip}
{literal}
<script type="text/javascript" language="javascript">
function searchOrder()
{
	
	var Jobtype = $('#jobtype').val();
	var Budget = $('#budget').val();
		var Project_status = $('#project_status').val();
		if(Jobtype!='' || Budget!='' || Project_status!=''){
			window.location = SITEROOT+'/jobs/myjobs/?Jobtype='+Jobtype+'&Budget='+Budget+'&Project_status='+Project_status;
		}
		
	//}
}

// For Declined message
	var GB_ANIMATION = true;
    jQuery(document).ready(function(){
    	jQuery("a.my_review").click(function(){
        var t = this.title || jQuery(this).text() || this.href;
 			GB_show("",this.href,450,700);
  			return false;
       });
     });
</script>
{/literal}

{include file=$header_end}


<section class="middle_portion">
	<section class="inner_head">Dashboard</section>
    <section class="inner_containstart">
    	<!-- dashboard Left Content Start -->
        	{include file=$cms_left_content}
        <!-- dashboard Left Content End -->
        <!-- dashboard Right Content Start -->
        	<section class="dash_right">
            <section class="title_box">
            	<h4>My Jobs</h4>
            	 <section class="clear"></section>
                 
                </section>                             
				{if $msg} <span style="padding:10px">{$msg} </span>{/if}
                
                <div class="faq_legend_portion">
                            <div class="faq_legend_hd">Legend :</div>
                            <div class="faq_icons_grebox" style="width:659px;" >
                                <div class="faq_column1">
                                    <div>
                                        <div class="faq_active_icon">Open status means Active Jobs.</div>
                                        <div class="clear"></div>
                                        <div class="faq_active_icon">Accepted means Award the job to Tradesman.</div>
                                        <div class="clear"></div>
                                    </div>
                                   
                                </div>
                                <div class="faq_column1">
                                 
                                 
                                    <div>
                                        <div class="faq_active_icon">Review means rate tradesman.</div>
                                        <div class="clear"></div>
                                        <div class="faq_active_icon">Purchase means select Tradesman.</div>                                        
                                        <div class="clear"></div>
                                        
                                    </div>
                
                                </div>  
								 <div class="clear"></div>
                                <p>Review all suppliers messages by clicking on the link in "Suppliers" column</p>
                                <div class="clear"></div>
                             
                           </div>  
                            
                           
                           <div class="clear"></div>
                           
                         </div>
                <section class="mainbox_findjobs">

				<section class="jobs_manag_box">
                 <section class="group_search_box">
                 <form name="searchfrm" id="searchfrm" action="{$siteroot}/jobs/myjobs/" method="POST" >
					 <select class="select" name="jobtype" id="jobtype" style="width:200px;">
                        <option value="0">Select Job Type</option>
                        {section name=i loop=$getallTradeJobType}
                        <option value="{$getallTradeJobType[i].id}" {if $smarty.get.id2 eq $getallTradeJobType[i].id || $smarty.post.jobtype eq $getallTradeJobType[i].id} selected="selected" {/if}>{$getallTradeJobType[i].trade_category}</option>				                        
                        {/section}
	                 </select>   &nbsp;&nbsp;
                     <select class="select" name="budget" id="budget" style="width:180px;">
                        <option value="0">Select Approximate Budget</option>
                        {section name=i loop=$getallBudget}
                        <option value="{$getallBudget[i].budget_id}" {if $smarty.get.id3 eq $getallBudget[i].budget_id || $smarty.post.budget eq $getallBudget[i].budget_id} selected="selected" {/if}>Under ${$getallBudget[i].budget_name}</option>                     
                        {/section}
                     </select>   &nbsp;&nbsp;                    
                     <select class="select" name="project_status" id="project_status" style="width:112px;">
                        <option value="0">Select Stauts</option>
                        <option value="Open" {if $smarty.get.id4 eq 'Open' || $smarty.post.project_status eq 'Open'} selected="selected" {/if}>Open</option>
                        <option value="Accept" {if $smarty.get.id4 eq 'Accept' || $smarty.post.project_status eq 'Accept'} selected="selected" {/if}>Accepted</option>                        
                        <option value="Completed" {if $smarty.get.id4 eq 'Completed' || $smarty.post.project_status eq 'Completed'} selected="selected" {/if}>Completed</option>
                     </select>   &nbsp;&nbsp;                    
                    <input type="submit" class="btn" value="Go">
                    &nbsp;&nbsp;
                    <input type="button" class="btn btnwdth70" value="Clear" onclick="javascript:window.location='{$siteroot}/jobs/myjobs/';">
                    </form>
                    <section class="clear"></section>
                  </section>
                	<dl>
                    	<dt class="col1">Job ID</dt>
                    	<dt class="col2">Job Type</dt>
                        <dt class="col3">Postal Code</dt>
                        <dt class="col4">Job Description</dt>
                        <dt class="col5" style="text-align:justify">Budget</dt>
                        <dt class="col6">Status</dt>
                        <dt class="col7">Suppliers</dt>
                        <dt class="col8">Review</dt>
                        <dt class="col9">Action</dt>
                        <section class="clear"></section>
                    </dl>
                    {section name=i loop=$jobsArray}
                    <dl>
                    	<dd class="col1">#PR{$jobsArray[i].postjob_id}</dd>
                    	<dd class="col2"> {$jobsArray[i].jobtypename} </dd>
                        <dd class="col3"> <span style="padding-left:20px;">{$jobsArray[i].area}</span> </dd>
                        <dd class="col4">
                        	{$jobsArray[i].job_desc|truncate:50:"..."} 
                        </dd>
                        <dd class="col5" style="text-align:justify">${$jobsArray[i].budgetname}</dd>
                        <dd class="col6">{if $jobsArray[i].project_status eq 'Accept'} <a href="{$siteroot}/jobs/Accept/{$jobsArray[i].postjob_id|base64_encode}/myjobs/" onclick="javascript:return confirm('Are you sure do you want to complete this job?');" >Accepted</a> {else}{$jobsArray[i].project_status}{/if}</dd>
                        <dd class="col7"><span style="padding-left:20px;"><a {if $jobsArray[i].countofleads > '0'} href="{$siteroot}/jobs/1/{$jobsArray[i].postjob_id|base64_encode}/myjobleads/"  {else} href="javascript:;" {/if} style="padding-left:10px;">[{$jobsArray[i].countofleads}]</a></span></dd>
                        <dd class="col8">{if $jobsArray[i].project_status eq 'Completed'} {if $jobsArray[i].reviewid eq ''} <a href="{$siteroot}/jobs/{$jobsArray[i].postjob_id}/post/postreview/" class="my_review">Post Reviews</a>{else}<a href="{$siteroot}/jobs/{$jobsArray[i].reviewid}/see/postreview/" class="my_review">See Reviews</a>{/if}{else}---{/if}</dd>
                        <dd class="col9"><a href="{$siteroot}/jobs/{$jobsArray[i].postjob_id|base64_encode}/viewjob/" ><img src="{$siteroot}/templates/default/images/icon-search.png" width="20" height="22" alt="View Detail" title="View Detail"/></a> &nbsp;<a href="{$siteroot}/jobs/{$jobsArray[i].postjob_id|base64_encode}/editjob/" ><img src="{$siteroot}/templates/default/images/edit_icon.png" width="20" height="22" alt="Edit Job" title="Edit Job"/></a> &nbsp;{if $jobsArray[i].project_status eq 'Open'} <a href="{$siteroot}/jobs/delete/{$jobsArray[i].postjob_id|base64_encode}/myjobs/" onclick="javascript:return confirm('Are you sure do you want to delete this record?');"><img src="{$siteroot}/templates/default/images/delete_icon.png" width="20" height="22" alt="Delete" title="Delete"/></a>{else}<img src="{$siteroot}/templates/default/images/icon-warnning.png" width="20" height="22" alt="Cant Delete" title="Cant Delete"/> {/if}</dd>
                        <section class="clear"></section>
                    </dl>
                    {sectionelse}
                    	<div class="error" style="padding:10px;text-align:center;">Oops, Sorry there are no jobs.</div>
                    {/section}
                  		
                        {if $pagenation}
                            <section class="pagna">
                            {$pagenation}
                            </section>
                        {/if}	     

                        
                        <section class="clear"></section>
                </section>   
                 <section class="bgimg_shadow"></section>
				
			<section class="clear"></section>
            
            </section>
            
            
                
                
            </section>
        <!-- dashboard Right Content End -->
        	<section class="clear"></section>
    </section>
</section>
{include file=$footer}